import { observable, action, runInAction } from 'mobx-miniprogram';
// 直接从模型文件引入，避免循环依赖
const { project_model } = require('../../../config/models_config');

class ProjectStore {
    // 可观察状态
    @observable loading = false;
    @observable projects = [];
    @observable currentProject = null;
    @observable projectCount = 0;
    
    // 行为方法
    @action
    async loadProjects() {
        this.loading = true;
        try {
            // 实现加载项目列表逻辑
            this.loading = false;
        } catch (error) {
            this.loading = false;
            console.error('加载项目失败', error);
        }
    }
}

export default new ProjectStore();